package com.itheima.member;

import com.hzheima.util.ImageUtil;
import com.itheima.ExtendsClass.Fly;

public class Bullet extends Fly {
    private  int yspeed;//子弹移动速度
    public Bullet(int px,int py) {
         img = ImageUtil.getImg("ZD1.png");
         width = img.getWidth();
         hight = img.getHeight();
         x = px + 25;
         y = py - 35;
         yspeed = 5;
    }
    /**
     * 子弹移动
     */
    public void move(){
        y -= yspeed;
    }

//    @Override
//    public void draw(Graphics g) {
//        super.draw(g);
//        g.drawImage(img2,this.x,this.y,img.getWidth(),img.getHeight(),null);
//    }
}
